package practica3;

import weka.classifiers.rules.OneR;
import weka.core.Instances;

/**Clase que utiliza la libreria GridSearch*/
public class GridSearch {
	
	public GridSearch(){}

	public void gSearch(Instances data) throws Exception{
		
		weka.classifiers.meta.GridSearch gs = new weka.classifiers.meta.GridSearch();
		
		System.out.println("\n----------------------------------");
		System.out.println("UTILIZANDO LA LIBRERIA GridSearch:");
		System.out.println("----------------------------------");
		try{
			gs.setClassifier(new OneR());
			gs.buildClassifier(data);  
		}catch(Exception e){
			System.out.println(e.getMessage());
		}
	}
}
